<%--
  User: Shengzhao Li
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>日志评论</title>
</head>
<body>
<div id="log_comment_form_page" data-role="dialog">
    <div data-role="content">
        <form:form commandName="logCommentDto" id="log_comment_form" data-ajax="false"
                   onsubmit="return validCommentForm(this);">
            <ul data-role="listview">
                <li>
                    <div class="center">
                        <textarea name="content" id="content_"
                                  placeholder="请输入评论内容...">${logCommentDto.content}</textarea>
                        <span id="content_error" class="red" style="display: none;">请输入点内容吧.</span>
                    </div>
                    <div data-role="fieldcontain">
                        <button type="submit" data-theme="b">完成</button>
                        <a href="javascript:void(0);" data-role="button" data-rel="back">取消</a>
                    </div>
                </li>
            </ul>
        </form:form>
    </div>
    <script type="text/javascript">
        function validCommentForm(form) {
            var result = true;
            var text = $(form).find("#content_").val();
            if (text == '') {
                result = false;
                $(form).find("#content_error").fadeIn(800).delay(800).fadeOut(800);
            }
            return result;
        }
    </script>
</div>
</body>
</html>